import edu.udo.cs.wvtool.wordlist.WVTWordList;

import java.io.File;
import java.io.FileWriter;

/**
 * Created by IntelliJ IDEA.
 * User: tobias
 * Date: 5/5/11
 * Time: 8:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class Main {


    public static void main(String[] args) {

        try {

             BaseModule bm = new BaseModule();
            bm.parseDocuments("/home/tobias/Skola/AI/20_newsgroups_small");
            WVTWordList wordlist = bm.createWordList();
            wordlist.store(new FileWriter("wordlist.txt"));
            //System.out.println(wordlist.getNumWords());
            DataSet data = bm.createVectors(wordlist);
            data.setFeatureSetSize(100);
            data.store(new File("output2.txt"));
            //Dataset data = FileHandler.loadDataset(new File("iris.data"), 4, ",");
            //Classifier knn = new WekaClassifier(new SMO());
            //knn.buildClassifier(data);
            //CrossValidation cv = new CrossValidation(knn);
            //Map<Object, PerformanceMeasure> p = cv.crossValidation(data);

            //System.out.println("hej");
            //data.setFeatureSetSize(100);
            //data.store(new File("output2.txt"));
            //Bayes b = new Bayes();
            //System.out.println(b.classify("hejsan svejsan"));
        } catch(Exception e) {
            System.out.println(e);
            System.exit(-1);
        }


    }
}